function [readmode] = getreadmode(nargin, n)
% if nargin > 2 and ctl ~= empty and n > 0, then we can use ctl (readmode is set to 1)
% otherwise, do in the manual mode. (readmode=0)
%
global CONTROL

if(nargin > 2 & ~isempty(CONTROL) & n > 0)
   readmode = 1;
else
   readmode = 0;
end
return;
